﻿/*
------------------------------------------------
    Rodeo Game Engine
    
    Rodeo Core Module
    AudioManager.h

    Copyright(c) Marcin Goryca
------------------------------------------------
*/
#ifndef RODEO_CORE_AUDIOMANAGER_H_
#define RODEO_CORE_AUDIOMANAGER_H_

#ifndef VECTOR_H_
#include <vector>
#endif    //VECTOR_H_

#ifndef RODEO_CORE_SINGLETON_H_
#include "core\singleton.h"
#endif    //RODEO_CORE_SINGLETON_H_

#ifndef RODEO_AUDIO_SOUNDOBJECT_H_
#include "audio\soundobject.h"
#endif    //RODEO_AUDIO_SOUNDOBJECT_H_

namespace rodeocore
{
class AudioManager : public Singleton<AudioManager>
{
public:
    AudioManager()
    :sound_object_(NULL),
     sound_container_(0)
    {}

    //explicit AudioManager(const char* filename){}

    ~AudioManager()
    {
        clean();
    }

    // Gets sound object
    // Returns SounObject pointer to the sound object
    rodeoaudio::SoundObject* getSoundObject() const { return sound_object_; }

    // Sets SoundObject object
    void setSoundObject(rodeoaudio::SoundObject* so) { sound_object_ = so; }

    // Gets Container of the sound  
    // Returns Vector object, container of SoundObject objects
     std::vector<rodeoaudio::SoundObject*> getSoundContainer() const { return sound_container_; }

     // Puts SoundObject into the container
     void putSound(rodeoaudio::SoundObject* so);
protected:

private:

    // Copy Constructor
    AudioManager(const AudioManager& copy);

    // Copy operator
    AudioManager& operator=(const AudioManager& copy);
     
    // Cleans the memory
    void clean();  

//==== MEMBERS ====//
    rodeoaudio::SoundObject* sound_object_;
    std::vector<rodeoaudio::SoundObject*> sound_container_;
};
}    //end of rodeocore namespace
#endif    //RODEO_CORE_AUDIOMANAGER_H_